let computed = {
  // 列表数据
  listData() {
    return this.$store.state.planner.listData
  },
  // 查看日志
  logList() {
    return this.$store.state.planner.logList
  },
  // 周计划状态
  WeekPlanStatus() {
    let WeekPlanStatus = this.$store.state.dict.WeekPlanStatus.labels || []
    return this.addLabelAll(WeekPlanStatus)
  },
  // 密级
  fileSecretLevel() {
    return this.$store.state.dict.fileSecretLevel.labels || []
  },
  // 修改按钮
  eidtBtnStatus() {
    let status = false
    if (this.selectItems.length > 1) {
      status = true
      return {status: status, content: '请选择一条数据'}
    }
    /*if (this.selectItems.some((item) => item.weekPlanStatusValue === 'Unconfirmed')) {
      status = true
    }*/
    return {
      status: status,
      content: '请选择状态不是"待确认"的数据'
    }
  },
  // 删除按钮
  deleteBtnStatus() {
    let status = false
    if (this.selectItems.some((item) => item.weekPlanStatusValue !== 'Draft')) {
      status = true
    }
    return {
      status: status,
      content: '请选择状态是"草稿"的数据'
    }
  },
  // 提交按钮
  submitBtnStatus() {
    let status = false
    if (this.selectItems.some((item) => item.weekPlanStatusValue !== 'Draft' && item.weekPlanStatusValue !== 'Dismissed')) {
      status = true
    }
    return {
      status: status,
      content: '请选择状态是"草稿"或"已退回"的数据'
    }
  },
  tableColConfig() {
    let tableColConfig = [
      {
        prop: 'name',
        label: '周计划名称',
        colConfig: {minWidth: 200, fixed: 'left', align: 'left'}
      },
      {
        prop: 'weekPlanStatusLabel',
        label: '状态',
        filterAble: true,
        searchConfig: {name: 'weekPlanStatusId', type: 'select', dict: 'WeekPlanStatus'},
        colConfig: {minWidth: 100, fixed: 'left', align: 'center', comp: 'WeekPlanStatus'}
      },
      {
        prop: 'fileName',
        label: '附件详情',
        searchConfig: {name: 'fileName'},
        colConfig: {minWidth: 200, align: 'left', comp: 'fileCell'}
      },
      {
        prop: 'planStartDate',
        label: '计划开始时间',
        searchConfig: {type: 'date'},
        colConfig: {minWidth: 110, formatToDay: true}
      },
      {
        prop: 'planEndDate',
        label: '计划完成时间',
        searchConfig: {type: 'date'},
        colConfig: {minWidth: 110, formatToDay: true}
      },
      {prop: 'creatorName', label: '创建人', colConfig: {minWidth: 110}},
      {
        prop: 'weekPlanCreateDate',
        label: '创建时间',
        searchConfig: {type: 'date'},
        colConfig: {
          minWidth: 160,
          format: 'YYYY-MM-DD hh:mm:ss'
        }
      },
    ]
    return tableColConfig
  },
  // 列循环
  columnList() {
    return this.tableColConfig.filter(item => item.noForCol !== true && item.isShow !== false)
    // return this.tableColConfig.filter(item => item.noForCol !== true && (item.noChecked === true || this.checkedKeys.some(key => key === item.prop)))
  },
}
export default computed
